<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>org.apache.commons.collections4.bag (Apache Commons Collections 4.0 API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="org.apache.commons.collections4.bag (Apache Commons Collections 4.0 API)";
    }
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!--   -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/package-summary.html">Prev Package</a></li>
<li><a href="../../../../../org/apache/commons/collections4/bidimap/package-summary.html">Next Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/bag/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_top");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<a name="skip-navbar_top">
<!--   -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package&nbsp;org.apache.commons.collections4.bag</h1>
<div class="docSummary">
<div class="block">This package contains implementations of the <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> and
 <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a> interfaces.</div>
</div>
<p>See:&nbsp;<a href="#package_description">Description</a></p>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="packageSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/AbstractBagDecorator.html" title="class in org.apache.commons.collections4.bag">AbstractBagDecorator</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <code>Bag</code> to provide additional behaviour.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Abstract implementation of the <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> interface to simplify the creation
 of subclass implementations.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/AbstractMapBag.MutableInteger.html" title="class in org.apache.commons.collections4.bag">AbstractMapBag.MutableInteger</a></td>
<td class="colLast">
<div class="block">Mutable integer class for storing the data.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/AbstractSortedBagDecorator.html" title="class in org.apache.commons.collections4.bag">AbstractSortedBagDecorator</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <code>SortedBag</code> to provide additional behaviour.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/CollectionBag.html" title="class in org.apache.commons.collections4.bag">CollectionBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> to comply with the Collection contract.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/CollectionSortedBag.html" title="class in org.apache.commons.collections4.bag">CollectionSortedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a> to comply with the Collection contract.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/HashBag.html" title="class in org.apache.commons.collections4.bag">HashBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Implements <code>Bag</code>, using a <a href="http://download.oracle.com/javase/6/docs/api/java/util/HashMap.html?is-external=true" title="class or interface in java.util"><code>HashMap</code></a> to provide the
 data storage.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/PredicatedBag.html" title="class in org.apache.commons.collections4.bag">PredicatedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> to validate that additions
 match a specified predicate.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/PredicatedSortedBag.html" title="class in org.apache.commons.collections4.bag">PredicatedSortedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a> to validate that additions
 match a specified predicate.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/SynchronizedBag.html" title="class in org.apache.commons.collections4.bag">SynchronizedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> to synchronize its behaviour
 for a multi-threaded environment.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/SynchronizedSortedBag.html" title="class in org.apache.commons.collections4.bag">SynchronizedSortedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a> to synchronize its behaviour
 for a multi-threaded environment.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/TransformedBag.html" title="class in org.apache.commons.collections4.bag">TransformedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> to transform objects that are added.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/TransformedSortedBag.html" title="class in org.apache.commons.collections4.bag">TransformedSortedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a> to transform objects that are added.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/TreeBag.html" title="class in org.apache.commons.collections4.bag">TreeBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Implements <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a>, using a <a href="http://download.oracle.com/javase/6/docs/api/java/util/TreeMap.html?is-external=true" title="class or interface in java.util"><code>TreeMap</code></a> to provide the data storage.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/UnmodifiableBag.html" title="class in org.apache.commons.collections4.bag">UnmodifiableBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> to ensure it can't be altered.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/commons/collections4/bag/UnmodifiableSortedBag.html" title="class in org.apache.commons.collections4.bag">UnmodifiableSortedBag</a>&lt;E&gt;</td>
<td class="colLast">
<div class="block">Decorates another <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a> to ensure it can't be altered.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="package_description">
<!--   -->
</a>
<h2 title="Package org.apache.commons.collections4.bag Description">Package org.apache.commons.collections4.bag Description</h2>
<div class="block">This package contains implementations of the <a href="../../../../../org/apache/commons/collections4/Bag.html" title="interface in org.apache.commons.collections4"><code>Bag</code></a> and
 <a href="../../../../../org/apache/commons/collections4/SortedBag.html" title="interface in org.apache.commons.collections4"><code>SortedBag</code></a> interfaces.
 A bag stores an object and a count of the number of occurrences of the object.
 <p>
 The following implementations are provided in the package:
 <ul>
   <li>HashBag - implementation that uses a HashMap to store the data
   <li>TreeBag - implementation that uses a TreeMap to store the data
 </ul>
 <p>
 The following decorators are provided in the package:
 <ul>
   <li>Synchronized - synchronizes method access for multi-threaded environments
   <li>Unmodifiable - ensures the bag cannot be altered
   <li>Predicated - ensures that only elements that are valid according to a predicate can be added
   <li>Transformed - transforms each element added to the bag
   <li>Collection - ensures compliance with the java.util.Collection contract
 </ul></div>
<dl><dt><span class="strong">Version:</span></dt>
  <dd>$Id: package-info.java 1540804 2013-11-11 18:58:31Z tn $</dd></dl>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!--   -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!--   -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/commons/collections4/package-summary.html">Prev Package</a></li>
<li><a href="../../../../../org/apache/commons/collections4/bidimap/package-summary.html">Next Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/commons/collections4/bag/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
  allClassesLink = document.getElementById("allclasses_navbar_bottom");
  if(window==top) {
    allClassesLink.style.display = "block";
  }
  else {
    allClassesLink.style.display = "none";
  }
  //-->
</script>
</div>
<a name="skip-navbar_bottom">
<!--   -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2001&#x2013;2013 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>
